﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SubForm.Master" AutoEventWireup="true"
    CodeBehind="FeedbackPreContract.aspx.cs" Inherits="PreContractWeb.Task.FeedbackPreContract" %>

<%@ Register Src="../UserControl/Pager.ascx" TagName="Pager" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script language="javascript" type="text/javascript">
        function ShowPage(id) {
            window.open('FeedbackHistoryList.aspx?PreContractID=' + id, '', 'height=750,width=980,top=150,left=150,menubar=0,resizable=yes,scrollbars=yes');
        }
    </script>
    <br />
    <div id="divError" runat="server" visible="false">
    </div>
    <div id="divConnect" runat="server">
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td class="panel_header">
                    查询条件(Search Condition)
                </td>
            </tr>
            <tr>
                <td>
                    <br />
                    <table width="800px" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td align="left" valign="middle">
                                预合同号:<br />
                                Pre-Contract #:
                            </td>
                            <td align="left" valign="middle">
                                <asp:TextBox ID="tbContractNo" runat="server" Width="160"></asp:TextBox>
                            </td>
                            <td align="left" valign="middle">
                                预合同名称:<br />
                                Pre-Contract Name:
                            </td>
                            <td align="left" valign="middle">
                                <asp:TextBox ID="tbContractName" runat="server" Width="160"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="left" valign="middle">
                                产品:<br />
                                Product:
                            </td>
                            <td align="left" valign="middle">
                                <asp:TextBox ID="tbProduct" runat="server" Width="160"></asp:TextBox>
                            </td>
                            <td align="left" valign="middle" colspan="2">
                                <asp:Button ID="btnQuickSearch" runat="server" CssClass="bgButton" Text="搜索 (Search)"
                                    Width="100px" OnClick="btnQuickSearch_Click" />
                                <asp:Button ID="btnClearSearch" runat="server" CssClass="bgButton" Text="清除 (Clear)"
                                    Width="100px" OnClick="btnClearSearch_Click" />
                            </td>
                        </tr>
                    </table>
                    <br />
                </td>
            </tr>
            <tr>
                <td align="left" valign="middle" style="border-top: #bbbbbb 1px dashed">
                    已反馈合同
                    <asp:Label ID="lblFeedbackPreContractCount" runat="server" Text="0" ForeColor="Blue">
                    </asp:Label>
                    个 未反馈合同
                    <asp:Label ID="lblNoFeedbackPreContractCount" runat="server" Text="0" ForeColor="Blue">
                    </asp:Label>
                    个
                </td>
            </tr>
        </table>
        <div id="SalesFeddbackContainer" runat="server">
            <asp:GridView ID="gvPreContractInfo" runat="server" PageSize="10" AutoGenerateColumns="False"
                DataKeyNames="PreContractID" AllowPaging="True" OnRowDataBound="gvPreContractInfo_RowDataBound"
                CssClass="PreContractInfoTab">
                <PagerSettings Visible="False"></PagerSettings>
                <EmptyDataTemplate>
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td>
                                没有数据(No Data).
                            </td>
                        </tr>
                    </table>
                </EmptyDataTemplate>
                <RowStyle Height="40px" CssClass="table_row_1"></RowStyle>
                <SelectedRowStyle CssClass="SelectedRow"></SelectedRowStyle>
                <HeaderStyle CssClass="table_header"></HeaderStyle>
                <AlternatingRowStyle CssClass="table_row_2"></AlternatingRowStyle>
                <Columns>
                    <asp:BoundField HtmlEncode="False" DataField="DicItemValue" HeaderText="类型">
                        <ItemStyle HorizontalAlign="Center" Width="60px" Height="40px" />
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="False" DataField="PreContractNo" HeaderText="预合同号">
                        <ItemStyle HorizontalAlign="Center" Width="120px" Height="40px" />
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="False" DataField="ContractName" HeaderText="合同名称">
                        <ItemStyle HorizontalAlign="Center" Width="240px" Height="40px" />
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="False" DataField="ProductName" HeaderText="产品">
                        <ItemStyle HorizontalAlign="Center" Width="120px" Height="40px" />
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="False" DataField="CygnusME" HeaderText="Cygnus金额ME" DataFormatString="{0:N4}">
                        <ItemStyle HorizontalAlign="Center" Width="60px" Height="40px"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="False" DataField="PromisedDate" DataFormatString="{0:yyyy-MM-dd}"
                        HeaderText="Cygnus转正时间">
                        <ItemStyle HorizontalAlign="Center" Width="120px" Height="40px"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="False" DataField="OrigonME" HeaderText="Origon金额ME" DataFormatString="{0:N4}">
                        <ItemStyle HorizontalAlign="Center" Width="60px" Height="40px"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="False" DataField="SignDue" DataFormatString="{0:yyyy-MM-dd}"
                        HeaderText="Orion转正时间">
                        <ItemStyle HorizontalAlign="Center" Width="120px" Height="40px"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="False" DataField="ERPReceived" DataFormatString="{0:yyyy-MM-dd}"
                        HeaderText="订单确认时间">
                        <ItemStyle HorizontalAlign="Center" Width="120px" Height="40px"></ItemStyle>
                    </asp:BoundField>
                </Columns>
            </asp:GridView>
            <div class="SalesFeedbackSave" style="width: 34%;">
                <asp:GridView ID="gvSalesFeedBack" runat="server" PageSize="10" AutoGenerateColumns="False"
                    DataKeyNames="PreContractID" AllowPaging="True" OnRowCommand="gvSalesFeedBack_RowCommand"
                    OnRowDataBound="gvSalesFeedBack_RowDataBound" CssClass="SalesFeedBackTab">
                    <PagerSettings Visible="False"></PagerSettings>
                    <EmptyDataTemplate>
                        <table width="100%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td>
                                    &nbsp;
                                </td>
                            </tr>
                        </table>
                    </EmptyDataTemplate>
                    <RowStyle Height="40px" CssClass="table_row_1"></RowStyle>
                    <SelectedRowStyle CssClass="SelectedRow"></SelectedRowStyle>
                    <HeaderStyle CssClass="table_header"></HeaderStyle>
                    <AlternatingRowStyle CssClass="table_row_2"></AlternatingRowStyle>
                    <Columns>
                        <asp:TemplateField HeaderText="签约方式">
                            <ItemTemplate>
                                <asp:DropDownList ID="dpSignType" runat="server" />
                            </ItemTemplate>
                            <ItemStyle Height="40px" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="处理方式">
                            <ItemTemplate>
                                <asp:DropDownList ID="dpTreatmentWay" runat="server" />
                            </ItemTemplate>
                            <ItemStyle Height="40px" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="处理日期">
                            <ItemTemplate>
                                <asp:TextBox ID="tbTreatmentDate" runat="server" onkeypress="event.returnValue=false;"
                                    CssClass="cssPopdate" checkmaster="checkDate" allowempty="false" Width="60px"></asp:TextBox>
                                </td>
                            </ItemTemplate>
                            <ItemStyle Height="40px" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="到货当季能否开票">
                            <ItemTemplate>
                                <asp:DropDownList ID="dpInvoiceStaus" runat="server" />
                            </ItemTemplate>
                            <ItemStyle Height="40px" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="取消进展">
                            <ItemTemplate>
                                <asp:DropDownList ID="dpCancelProcess" runat="server" />
                            </ItemTemplate>
                            <ItemStyle Height="40px" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="问题分类一级">
                            <ItemTemplate>
                                <asp:DropDownList ID="dpProblemLV1" runat="server" AutoPostBack="true" OnTextChanged="DpProblemLV1_TextChanged">
                                </asp:DropDownList>
                            </ItemTemplate>
                            <ItemStyle Height="40px" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="问题分类二级">
                            <ItemTemplate>
                                <asp:DropDownList ID="dpProblemLV2" runat="server" Width="200px">
                                </asp:DropDownList>
                            </ItemTemplate>
                            <ItemStyle Height="40px" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Dashboard Issue分类">
                            <ItemTemplate>
                                <asp:DropDownList ID="dpDashboardIssueType" runat="server">
                                </asp:DropDownList>
                            </ItemTemplate>
                            <ItemStyle Height="40px" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="预合同当前负责人">
                            <ItemTemplate>
                                <asp:TextBox ID="tbPeopleInCharge" runat="server" MaxLength="50"></asp:TextBox>
                            </ItemTemplate>
                            <ItemStyle Height="40px" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="其他说明">
                            <ItemTemplate>
                                <asp:TextBox ID="tbComments" runat="server" Width="240px" MaxLength="500"></asp:TextBox>
                            </ItemTemplate>
                            <ItemStyle Height="40px" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="操作">
                            <ItemTemplate>
                                <asp:Button ID="btnSave" runat="server" Text="保存" CommandName="Save" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>"
                                    OnClientClick="return confirm('Are you sure to save?')" />
                            </ItemTemplate>
                            <ItemStyle Height="40px" />
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </div>
        </div>
        <uc1:Pager ID="pgPreContractInfo" runat="server" OnAfter_PageChanged="pgPreContractInfo_After_PageChanged" />
        <div style="display: none">
            <uc1:Pager ID="pgSalesFeedback" runat="server" />
        </div>
    </div>
</asp:Content>
